<p>While the ternary operator is pleasingly compact, it's use can make code more difficult to read. It should therefore be avoided in favor of the more verbose <code>if</code>/<code>else</code> structure.</p>

<h2>Noncompliant Code Example</h2>
<pre>
System.out.println(i>10?"yes":"no");
</pre>

<h2>Compliant Solution</h2>
<pre>
if (i > 10) {
  System.out.println(("yes");
} else {
  System.out.println("no");
}
</pre>